package com.mysteel.common.exception;

/**
 * ProjectName: mail
 * ClassName: BizCodeEnum
 * Description:
 * date: 2020/12/30/030 10:33
 *
 * @author xiaochao
 */
public enum BizCodeEnum {
    /**
     * 统一错误码信息
     */
    UNKNOW_EXCEPTION(10000,"系统未知异常"),
    PARAMETER_VALID_EXCEPTION(10001,"参数格式校验失败"),
    SMS_CODE_EXCEPTION(10002,"获取验证码频繁，请稍后重试"),
    REQUEST_BLOCK_EXCEPTION(10003,"请求过于频繁，请稍后再试"),
    PRODUCT_UP_EXCEPTION(11000,"商品上架异常"),
    ORDER_PARAM_INPUT_EXCEPTION(13001,"订单参数异常"),
    ORDER_STOCK_NOT_ENOUGH(13002,"商品库存不足"),
    ORDER_TOKEN_INVALID_EXCEPTION(13003,"订单页面失效，请刷新重试"),
    ORDER_FARE_ADDRESS_EXCEPTION(13004,"订单收货地址信息错误"),
    ORDER_ITEM_INFO_EXCEPTION(13005,"订单购买商品信息有误，请重新确认"),
    ORDER_PRICE_CHECK_EXCEPTION(13006,"订单验价失败"),
    PHONE_HAS_BE_TAKEN(15000,"手机号被占用"),
    USERNAME_HAS_BE_TAKEN(15001,"用户名已存在"),
    ACCOUNT_PASSWORD_WRONG(15002,"用户名或密码错误"),
    SOCIAL_UID_IS_BLANK(15003,"微博社交登录UID为空");

    private Integer code;
    private String msg;

    BizCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
